<?php 
class GoodsTypeModel extends Model{
	public $table = 'goods_type';
	public $validate = array(array('gt_name','nonull','类型不能为空',2,3));
	
	//添加
	public function addGoodsType(){
		if ($this->create()) {
			return $this->add();
		}
	}

	//修改
	public function editGoodsType(){
		if ($this->create()) {
			return $this->save();
		}
	}
}



 ?>